OsmGt example

Imports and prepare input parameters

In [1]:
from IPython.display import display

from bokeh.plotting import output_notebook
from bokeh.plotting import show

import geopandas as gpd

from shapely.geometry import Point
from shapely.ops import linemerge

from easy_map_bokeh import EasyMapBokeh

from osmgt import OsmGt

from graph_tool.topology import shortest_path


output_notebook()


location = "Roanne"
Loading BokehJS ...

Get POIs

In [2]:
%%time

pois_gdf = OsmGt.pois_from_location(location).get_gdf()

display(pois_gdf.head(2))
2020-09-06 09:04:10 - OsmGtPoi        - INFO     : From location: Roanne
2020-09-06 09:04:10 - OsmGtPoi        - INFO     : Loading data...
2020-09-06 09:04:10 - OsmGtPoi        - INFO     : NominatimApi: Query 200:OK in 0.15 sec.
2020-09-06 09:04:11 - OsmGtPoi        - INFO     : OverpassApi: Query 200:OK in 0.79 sec.
2020-09-06 09:04:11 - OsmGtPoi        - INFO     : Formating data
2020-09-06 09:04:11 - OsmGtPoi        - INFO     : Prepare GeoDataframe
2020-09-06 09:04:11 - OsmGtPoi        - INFO     : GeoDataframe Ready
addr:postcode amenity atm change_machine name operator phone ref:FR:LaPoste source stamping_machine ... ref:EU:EVSE socket:type2 socket:typee bar covered social_facility:for type:FR:FINESS service:bicycle:Bicycle_Sales_and_Service service:bicycle:repair geometry
0 42300 post_office yes yes Roanne Principal La Poste 3631 07916A data.gouv.fr:LaPoste - 10/2012 yes ... NaN NaN NaN NaN NaN NaN NaN NaN NaN POINT (4.07225 46.04071)
1 NaN place_of_worship NaN NaN Chapelle Jean Puy NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN POINT (4.07073 46.03766)

2 rows × 122 columns

CPU times: user 119 ms, sys: 20.4 ms, total: 139 ms
Wall time: 1.06 s

Get Roads

In [3]:
%%time
roads_initialized = OsmGt.roads_from_location(
    location,
    mode="vehicle",
    additional_nodes=pois_gdf
)
roads_gdf = roads_initialized.get_gdf()

display(roads_gdf.head(2))
2020-09-06 09:04:11 - OsmGtRoads      - INFO     : From location: Roanne
2020-09-06 09:04:11 - OsmGtRoads      - INFO     : Loading data...
2020-09-06 09:04:11 - OsmGtRoads      - INFO     : NominatimApi: Query 200:OK in 0.12 sec.
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : OverpassApi: Query 200:OK in 0.91 sec.
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Rebuild network data
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Network cleaning...
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Starting: Adding new nodes on the network
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Find nearest line for each node
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Split line
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Topology lines checker: to add: 184, to split: 182
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Starting: Find intersections
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Done: Find intersections
2020-09-06 09:04:12 - OsmGtRoads      - INFO     : Build lines
2020-09-06 09:04:13 - OsmGtRoads      - INFO     : Prepare GeoDataframe
2020-09-06 09:04:13 - OsmGtRoads      - INFO     : GeoDataframe Ready
highway lanes:forward maxspeed name oneway ref id osm_url topo_uuid topology ... horse EntityHand SubClasses alt_name turn:lanes source:name maxspeed:backward maxspeed:forward cycleway:right:oneway geometry
0 primary 2 50 Rue de Charlieu yes D 482 24035569 https://www.openstreetmap.org/way/24035569 1_forward unchanged ... NaN NaN NaN NaN NaN NaN NaN NaN NaN LINESTRING (4.08544 46.05234, 4.08546 46.05248...
1 primary NaN 50 Rue de Charlieu yes D 482 24035570 https://www.openstreetmap.org/way/24035570 2_forward unchanged ... NaN NaN NaN NaN NaN NaN NaN NaN NaN LINESTRING (4.09087 46.06639, 4.09084 46.06622...

2 rows × 53 columns

CPU times: user 851 ms, sys: 77 ms, total: 928 ms
Wall time: 1.98 s

Display roads and nodes

In [4]:
%%time
layers_to_add = [
    {
        "input_gdf": roads_gdf,
        "legend": "roads",
        "color": "black",
    },
    {
        "input_gdf": pois_gdf,
        "legend": "POIs",
        "style": "square",
        "color": "blue",
        "size": 9
    },
]

my_map = EasyMapBokeh(
    "My roads and POIs",
    layers=layers_to_add
)
show(my_map.figure)
CPU times: user 2.12 s, sys: 26.6 ms, total: 2.14 s
Wall time: 2.14 s

Check topology details

In [5]:
%%time

roads_topology_gdfs = roads_initialized.topology_checker()

lines_unchanged = roads_topology_gdfs["lines_unchanged"]
lines_added = roads_topology_gdfs["lines_added"]
lines_split = roads_topology_gdfs["lines_split"]
nodes_added = roads_topology_gdfs["nodes_added"]
intersections_added = roads_topology_gdfs["intersections_added"]

layers_to_add = [
    {
        "input_gdf": lines_unchanged,
        "legend": "roads unchanged",
        "color": "black",
    },
    {
        "input_gdf": lines_added,
        "legend": "roads added",
        "color": "green",
    },
    {
        "input_gdf": lines_split,
        "legend": "roads split",
        "color": "orange",
    },
    {
        "input_gdf": intersections_added,
        "legend": "Intersections added",
        "color": "brown",
    },
    {
        "input_gdf": nodes_added,
        "legend": "Nodes added",  # POIs here
        "style": "square",
        "color": "blue",
        "size": 9
    },
]

my_map = EasyMapBokeh(
    "Topology about my roads and POIs",
    layers=layers_to_add
)
show(my_map.figure)
2020-09-06 09:04:15 - OsmGtRoads      - INFO     : Prepare topology data
2020-09-06 09:04:15 - OsmGtRoads      - INFO     : GeoDataframe Ready
CPU times: user 3.28 s, sys: 36 ms, total: 3.31 s
Wall time: 3.34 s

Get the graph-tool network and display it

In [6]:
%%time
graph = roads_initialized.get_graph()

# a plot method has been added on OsmGT.
graph.plot()
2020-09-06 09:04:18 - OsmGtRoads      - INFO     : Prepare graph
2020-09-06 09:04:20 - OsmGtRoads      - INFO     : Graph to PNG file
CPU times: user 11.9 s, sys: 51 ms, total: 12 s
Wall time: 7.84 s

Compute a shortest path

With graph-tools function

In [7]:
%%time
# now, we have to define a start point and a end point and get their wkt
start_node_topo_uuid = 47
end_node_topo_uuid = 63

# 'topo_uuid' is generated by osmgt (during the topology processing).
# Some roads has been split that's whyso this id has been created.
start_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]
end_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == end_node_topo_uuid]

start_node_wkt = start_node_gdf.iloc[0]["geometry"].wkt
end_node_wkt = end_node_gdf.iloc[0]["geometry"].wkt

# the graph have some methods (graph-tools method always exists!) to find egdes, vertices... Let's use the .find_vertex_from_name(). the wkt is the vertex name...
source_vertex = graph.find_vertex_from_name(start_node_wkt)
target_vertex = graph.find_vertex_from_name(end_node_wkt)

# shortest path computing...
path_vertices, path_edges = shortest_path(
    graph,
    source=source_vertex,
    target=target_vertex,
    weights=graph.edge_weights  # weigth is based on line length
)

# get path by using edge names
roads_ids = [
    graph.edge_names[edge]
    for edge in path_edges
]

roads_gdf_copy = roads_gdf.copy(deep=True)
shortest_path_found = roads_gdf_copy[roads_gdf['topo_uuid'].isin(roads_ids)].to_crs(3857)['geometry'].to_list()
shortest_path_found_gdf = gpd.GeoDataFrame(index=[0], crs="EPSG:3857", geometry=[linemerge(shortest_path_found)])

layers_to_add = [
    {
        "input_gdf": shortest_path_found_gdf,
        "legend": "shortest_path",
        "color": "red",
        "line_width": 5
    },
    {
        "input_gdf": start_node_gdf,
        "legend": "source node",
        "color": "blue",
        "style": "circle",
        "size": 9
    },
    {
        "input_gdf": end_node_gdf,
        "legend": "target node",
        "color": "green",
        "style": "circle",
        "size": 9
    },
]

my_shortest_path_map = EasyMapBokeh(
    "My shortest path 1",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)
CPU times: user 238 ms, sys: 11 ms, total: 249 ms
Wall time: 256 ms

With OsmGt function

In [8]:
%%time

start_node_topo_uuid = 47
end_node_topo_uuid = 63

start_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]
end_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == end_node_topo_uuid]

start_node = start_node_gdf.iloc[0]["geometry"]
end_node = end_node_gdf.iloc[0]["geometry"]

shortest_paths = OsmGt.shortest_path_from_location(
    "Roanne",
    [
        (start_node, end_node),
        (start_node, end_node),  # duplicate pairs are cleaned
    ],
    mode="pedestrian"
)
layers_to_add = [
    {
        "input_gdf": shortest_paths[["geometry"]],
        "legend": "shortest_path",
        "color": "red",
        "line_width": 5
    },
    {
        "input_gdf": start_node_gdf,
        "legend": "source node",
        "color": "blue",
        "style": "circle",
        "size": 9
    },
    {
        "input_gdf": end_node_gdf,
        "legend": "target node",
        "color": "green",
        "style": "circle",
        "size": 9
    },
]

my_shortest_path_map = EasyMapBokeh(
    "My shortest path 2",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)

display(shortest_paths)
2020-09-06 09:04:26 - OsmGtShortestPath - INFO     : Shortest path processing...
2020-09-06 09:04:26 - OsmGtShortestPath - INFO     : From location: Roanne
2020-09-06 09:04:26 - OsmGtShortestPath - INFO     : Loading data...
2020-09-06 09:04:26 - OsmGtShortestPath - INFO     : NominatimApi: Query 200:OK in 0.13 sec.
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : OverpassApi: Query 200:OK in 1.64 sec.
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Rebuild network data
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Network cleaning...
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Starting: Adding new nodes on the network
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Find nearest line for each node
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Split line
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Topology lines checker: to add: 2, to split: 2
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Starting: Find intersections
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Done: Find intersections
2020-09-06 09:04:28 - OsmGtShortestPath - INFO     : Build lines
2020-09-06 09:04:29 - OsmGtShortestPath - INFO     : Prepare graph
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : Prepare GeoDataframe
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : GeoDataframe Ready
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : Compute shortest path from 2189 to 2188
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : Prepare GeoDataframe
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : GeoDataframe Ready
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : Prepare GeoDataframe
2020-09-06 09:04:30 - OsmGtShortestPath - INFO     : GeoDataframe Ready
source_node target_node osm_ids osm_urls geometry
0 POINT (4.0697088 46.0410178) POINT (4.0757785 46.0315038) 99078739, 99078739, 99078739, 99211707, 992117... https://www.openstreetmap.org/way/99078739, ht... LINESTRING (4.06971 46.04102, 4.06966 46.04086...
CPU times: user 1.77 s, sys: 63.6 ms, total: 1.83 s
Wall time: 3.7 s

Compute an isochrone

Isochrone from times

In [9]:
%%time

start_node_topo_uuid = 47
source_node = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]

# 2 = 2 min ; 5 = 5 min ; 10 = 10 min
isochrones_polygon_values = {
    2: "#d9ef8b",
    5: "#fee08b",
    10: "#f46d43"
}

isochrones_lines_values = {
    2: "#668100",
    5: "#e2a803",
    10: "#962603"
}

trip_speed = 3  # km/h

location_point = source_node.iloc[0]["geometry"]
isochrones_polygons, isochrones_lines = OsmGt.isochrone_from_source_node(
    location_point,
    list(isochrones_polygon_values.keys()),
    trip_speed,
    mode="pedestrian"
)

isochrones_polygons["color"] = isochrones_polygons["iso_name"].map(lambda x: isochrones_polygon_values[int(x.split(" ")[0])])
isochrones_lines["color"] = isochrones_lines["iso_name"].map(lambda x: isochrones_lines_values[int(x.split(" ")[0])])


layers_to_add = [
    {
        "input_gdf": isochrones_polygons,
        "legend": "iso_name",
        "fill_color": "color",
        "line_color": "color",
        "fill_alpha": 0.5
    },
    {
        "input_gdf": source_node,
        "legend": "Source node",
        "style": "circle",
        "color": "red",
        "size": 5
    },
    {
        "input_gdf": isochrones_lines,
        "legend": "iso_name",
        "color": "color",
        "line_width": 2
    },
]

my_shortest_path_map = EasyMapBokeh(
    "Isochrones from times",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)

print("\nIsochrones polygons output")
display(isochrones_polygons)

print("\nIsochrones lines output")
display(isochrones_lines.head(2))
2020-09-06 09:04:30 - OsmGtIsochrone  - INFO     : Isochrone processing...
2020-09-06 09:04:30 - OsmGtIsochrone  - INFO     : From bbox: (4.0629714353691035, 46.03634090608913, 4.076446164630895, 46.045694298051714)
2020-09-06 09:04:30 - OsmGtIsochrone  - INFO     : Loading data...
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 0.4 sec.
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Rebuild network data
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Network cleaning...
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Starting: Adding new nodes on the network
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Find nearest line for each node
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Split line
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Topology lines checker: to add: 1, to split: 1
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Starting: Find intersections
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Done: Find intersections
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Build lines
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Prepare GeoDataframe
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
2020-09-06 09:04:31 - OsmGtIsochrone  - INFO     : Prepare graph
2020-09-06 09:04:33 - OsmGtIsochrone  - INFO     : Compute isochrone: 10 minutes => 500 meters
2020-09-06 09:04:35 - OsmGtIsochrone  - INFO     : Compute isochrone: 5 minutes => 250 meters
2020-09-06 09:04:35 - OsmGtIsochrone  - INFO     : Compute isochrone: 2 minutes => 100 meters
2020-09-06 09:04:36 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
ERROR:bokeh.core.validation.check:E-1006 (NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS): LegendItem.label is a field, but renderer data sources don't match: LegendItem(id='1874', ...)
Isochrones polygons output
iso_name iso_distance geometry color
0 10 minutes 500 POLYGON ((4.06420 46.04070, 4.06421 46.04163, ... #f46d43
1 5 minutes 250 POLYGON ((4.06699 46.04000, 4.06700 46.04055, ... #fee08b
2 2 minutes 100 POLYGON ((4.06852 46.04105, 4.06853 46.04113, ... #d9ef8b
Isochrones lines output
highway junction name id osm_url topo_uuid topology maxspeed oneway source ... service bicycle horse EntityHand SubClasses maxspeed:type iso_name iso_distance geometry color
0 pedestrian NaN Passage Bourgneuf 183704313 https://www.openstreetmap.org/way/183704313 1040 unchanged NaN no NaN ... NaN yes NaN NaN NaN NaN 10 minutes 500.0 LINESTRING (4.07047 46.03910, 4.07058 46.03910... #962603
1 service NaN NaN 183704684 https://www.openstreetmap.org/way/183704684 1071 unchanged NaN NaN NaN ... NaN NaN NaN NaN NaN NaN 10 minutes 500.0 LINESTRING (4.07225 46.03834, 4.07224 46.03833) #962603

2 rows × 36 columns

CPU times: user 6 s, sys: 92.8 ms, total: 6.09 s
Wall time: 6.51 s

Isochrone from distances

In [10]:
%%time
start_node_topo_uuid = 47
source_node = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]

trip_speed = 3  # km/h

isochrones_polygon_values = {
    500: "#d9ef8b",
    750: "#fee08b",
    1000: "#f46d43"
}
# 2 = 2 min ; 5 = 5 min ; 10 = 10 min


isochrones_lines_values = {
    500: "#668100",
    750: "#e2a803",
    1000: "#962603"
}

location_point = source_node.iloc[0]["geometry"]
isochrones_polygons, isochrones_lines = OsmGt.isochrone_distance_from_source_node(
    location_point,
    list(isochrones_polygon_values.keys()),  # meters
    trip_speed,
    mode="pedestrian"
)

isochrones_polygons["color"] = isochrones_polygons["iso_distance"].map(lambda x: isochrones_polygon_values[x])
isochrones_lines["color"] = isochrones_lines["iso_distance"].map(lambda x: isochrones_lines_values[x])


layers_to_add = [
    {
        "input_gdf": isochrones_polygons,
        "legend": "iso_distance",
        "fill_color": "color",
        "line_color": "color",
        "fill_alpha": 0.5
    },
    {
        "input_gdf": isochrones_lines,
        "legend": "iso_distance",
        "color": "color",
        "line_width": 2
    },
    {
        "input_gdf": source_node,
        "legend": "Source node",
        "style": "circle",
        "color": "orange",
        "size": 15
    },
]

my_shortest_path_map = EasyMapBokeh(
    "Isochrones from distance",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Isochrone processing...
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : From bbox: (4.056234070738207, 46.031663616316784, 4.083183529261792, 46.050370400246656)
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Loading data...
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 0.36 sec.
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Rebuild network data
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Network cleaning...
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Starting: Adding new nodes on the network
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Find nearest line for each node
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Split line
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Topology lines checker: to add: 1, to split: 1
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Starting: Find intersections
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Done: Find intersections
2020-09-06 09:04:37 - OsmGtIsochrone  - INFO     : Build lines
2020-09-06 09:04:38 - OsmGtIsochrone  - INFO     : Prepare GeoDataframe
2020-09-06 09:04:38 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
2020-09-06 09:04:38 - OsmGtIsochrone  - INFO     : Prepare graph
2020-09-06 09:04:45 - OsmGtIsochrone  - INFO     : Compute isochrone: 20.0 minutes => 1000 meters
2020-09-06 09:04:52 - OsmGtIsochrone  - INFO     : Compute isochrone: 15.0 minutes => 750 meters
2020-09-06 09:04:55 - OsmGtIsochrone  - INFO     : Compute isochrone: 10.0 minutes => 500 meters
2020-09-06 09:05:04 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
ERROR:bokeh.core.validation.check:E-1006 (NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS): LegendItem.label is a field, but renderer data sources don't match: LegendItem(id='2098', ...)
CPU times: user 27.8 s, sys: 102 ms, total: 27.9 s
Wall time: 28.3 s

Isochrone style

In [11]:
%%time

# we can change the isochrone style

start_node_topo_uuid = 47
source_node = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]

# 2 = 2 min ; 5 = 5 min ; 10 = 10 min
isochrones_polygon_values = {
    2: "#d9d9d9",
    5: "#969696",
    10: "#525252"
}

isochrones_lines_values = {
    2: "#bdbdbd",
    5: "#737373",
    10: "#252525"
}

trip_speed = 3  # km/h

location_point = source_node.iloc[0]["geometry"]
isochrones_polygons, isochrones_lines = OsmGt.isochrone_from_source_node(
    location_point,
    list(isochrones_polygon_values.keys()),
    trip_speed,
    mode="pedestrian",
    display_mode="web"  # HERE you can change the style (orthogonal by default, or web)
)

isochrones_polygons["color"] = isochrones_polygons["iso_name"].map(lambda x: isochrones_polygon_values[int(x.split(" ")[0])])
isochrones_lines["color"] = isochrones_lines["iso_name"].map(lambda x: isochrones_lines_values[int(x.split(" ")[0])])


layers_to_add = [
    {
        "input_gdf": isochrones_polygons,
        "legend": "iso_name",
        "fill_color": "color",
        "line_color": "color",
        "fill_alpha": 0.5
    },
    {
        "input_gdf": source_node,
        "legend": "Source node",
        "style": "circle",
        "color": "red",
        "size": 5
    },
    {
        "input_gdf": isochrones_lines,
        "legend": "iso_name",
        "color": "color",
        "line_width": 2
    },
]

my_shortest_path_map = EasyMapBokeh(
    "Isochrones from times",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)

print("\nIsochrones polygons output")
display(isochrones_polygons)

print("\nIsochrones lines output")
display(isochrones_lines.head(2))
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Isochrone processing...
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : From bbox: (4.0629714353691035, 46.03634090608913, 4.076446164630895, 46.045694298051714)
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Loading data...
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 0.31 sec.
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Rebuild network data
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Network cleaning...
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Starting: Adding new nodes on the network
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Find nearest line for each node
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Split line
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Topology lines checker: to add: 1, to split: 1
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Starting: Find intersections
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Done: Find intersections
2020-09-06 09:05:05 - OsmGtIsochrone  - INFO     : Build lines
2020-09-06 09:05:06 - OsmGtIsochrone  - INFO     : Prepare GeoDataframe
2020-09-06 09:05:06 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
2020-09-06 09:05:06 - OsmGtIsochrone  - INFO     : Prepare graph
2020-09-06 09:05:08 - OsmGtIsochrone  - INFO     : Compute isochrone: 10 minutes => 500 meters
2020-09-06 09:05:09 - OsmGtIsochrone  - INFO     : Compute isochrone: 5 minutes => 250 meters
2020-09-06 09:05:09 - OsmGtIsochrone  - INFO     : Compute isochrone: 2 minutes => 100 meters
2020-09-06 09:05:10 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
ERROR:bokeh.core.validation.check:E-1006 (NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS): LegendItem.label is a field, but renderer data sources don't match: LegendItem(id='2334', ...)
Isochrones polygons output
iso_name iso_distance geometry color
0 10 minutes 500 POLYGON ((4.06425 46.04061, 4.06429 46.04069, ... #525252
1 5 minutes 250 POLYGON ((4.06699 46.04000, 4.06704 46.04018, ... #969696
2 2 minutes 100 POLYGON ((4.06852 46.04105, 4.06852 46.04106, ... #d9d9d9
Isochrones lines output
highway junction name id osm_url topo_uuid topology maxspeed oneway source ... service bicycle horse EntityHand SubClasses maxspeed:type iso_name iso_distance geometry color
0 pedestrian NaN Passage Bourgneuf 183704313 https://www.openstreetmap.org/way/183704313 1040 unchanged NaN no NaN ... NaN yes NaN NaN NaN NaN 10 minutes 500.0 LINESTRING (4.07047 46.03910, 4.07058 46.03910... #252525
1 service NaN NaN 183704684 https://www.openstreetmap.org/way/183704684 1071 unchanged NaN NaN NaN ... NaN NaN NaN NaN NaN NaN 10 minutes 500.0 LINESTRING (4.07225 46.03834, 4.07224 46.03833) #252525

2 rows × 36 columns

CPU times: user 5.76 s, sys: 44.3 ms, total: 5.81 s
Wall time: 6.12 s